
module.exports = [
  // tracibility
  {
    url: '/web/tracibility',
    type: 'post',
    response: config => {
      var d = []
      console.log(config.body)
      switch (config.body.eventId) {
        case 800:
          d = { total: 2, products: [
            { seqNumber: 1,
              lineNumber: '1',
              productId: '222',
              productSN: '333',
              currentProcess: 'ST320',
              processName: '测试',
              testTime: '2022-04-20 21:00:00',
              resultStatus: 'OK' },
            { seqNumber: 2,
              lineNumber: '1',
              productId: '223',
              productSN: '334',
              currentProcess: 'ST120',
              processName: '测试2',
              testTime: '2022-04-20 22:00:00',
              resultStatus: 'OK' }] }
          break
        case 810:
          d = { total: 2, processes: [
            { processId: 123,
              lineNumber: '1',
              productId: '222',
              productSN: '333',
              processNumber: 'ST100',
              processName: '测试',
              testTime: '2022-04-20 21:00:00',
              resultStatus: 'OK' },
            { processId: 114,
              lineNumber: '1',
              productId: '222',
              productSN: '333',
              processNumber: 'ST120',
              processName: '测试2',
              testTime: '2022-04-20 22:00:00',
              resultStatus: 'OK' },
            { processId: 115,
              lineNumber: '1',
              productId: '222',
              productSN: '333',
              processNumber: 'ST130',
              processName: '测试2',
              testTime: '2022-04-20 22:20:00',
              resultStatus: 'OK' }] }
          break
        case 820:
          d = { total: 2, processes: [
            { processId: 123,
              lineNumber: '1',
              productId: '222',
              productSN: '333',
              processNumber: 'ST100',
              processName: '测试2',
              unit: 'mm',
              resultValue: '2.22',
              minValue: '0',
              standardValue: '2',
              maxValue: '4',
              testTime: '2022-04-20 21:00:00',
              resultStatus: 'OK' },
            { processId: 123,
              lineNumber: '1',
              productId: '222',
              productSN: '333',
              processNumber: 'ST100',
              processName: '测试2',
              unit: 'A',
              resultValue: '2.22',
              minValue: '0',
              standardValue: '2',
              maxValue: '4',
              testTime: '2022-04-20 22:00:00',
              resultStatus: 'OK' },
            { processId: 123,
              lineNumber: '1',
              productId: '222',
              productSN: '333',
              processNumber: 'ST100',
              processName: '测试2',
              unit: 'V',
              resultValue: '1.22',
              minValue: '0',
              standardValue: '2',
              maxValue: '4',
              testTime: '2022-04-20 22:20:00',
              resultStatus: 'NOK' }] }
          break
      }
      return {
        code: 20000,
        message: '',
        data: d
      }
    }
  }
]
